home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / lang / sofa.lha / sofa / smalleiffel / misc / benchmarks / gc / laestk / bench.e next >
Text File  |  2000-03-25  |  542b  |  43 lines

  1. class BENCH
  2.  
  3. creation make
  4.    
  5. feature
  6.    
  7.    make is
  8.       local
  9.      i: INTEGER;
  10.       do
  11.      from
  12.         i := 9;
  13.      until
  14.         i = 0
  15.      loop
  16.         -- recurse(50_000); -- large config
  17.         recurse(20_000);    -- small config
  18.         i := i - 1;
  19.      end
  20.       end
  21.    
  22.    recurse (i: INTEGER) is
  23.       local
  24.      p: POINT
  25.      j: INTEGER
  26.       do
  27.      if i /= 0 then
  28.         recurse(i-1);
  29.      else
  30.         -- trigger the GC
  31.         from
  32.            j := 7_000_000
  33.         until
  34.            j < 0
  35.         loop
  36.            !!p.make(1.0, 2.0)
  37.            j := j - 1
  38.         end
  39.      end
  40.       end
  41.    
  42.    end
  43.